package com.xiaoxing.zhinenghuacangku_jining.mvp.contract;

import com.jess.arms.mvp.IModel;
import com.jess.arms.mvp.IView;
import com.xiaoxing.zhinenghuacangku_jining.mvp.model.entity.JiNing_OutOfTheLibraryList;

import java.util.List;
import java.util.Map;

import io.reactivex.Observable;


public interface JiNing_OutOfTheLibraryContract {
    //对于经常使用的关于UI的方法可以定义到IView中,如显示隐藏进度条,和显示文字消息
    interface View extends IView {
        void searchOutStorageListAutoStoreSuccess(List<JiNing_OutOfTheLibraryList> outOfTheLibraryLists);

        void returnMaterialAutoStoreSuccess(String returnMaterialAutoStore);

        void callAutoMachineGetMaterialSuccess(String callAutoMachineGetMaterial);

        void outStoreForAndroidAutoSuccess(String outStoreForAndroidAuto);

        void returnMaterialAllAutoStoreSuccess(String returnMaterialAllAutoStore);

        void UpdateOutStorageListBackStatusSuccess(String updateOutStorageListBackStatus);

        void UpdateOutStorageListScanBufferStatusSuccess(String updateOutStorageListScanBufferStatus);

        void UpdateOutStorageListScanMaterialStatusSuccess(String updateOutStorageListScanMaterialStatus);

        void UpdateOutStorageListOutStatusSuccess(String updateOutStorageListOutStatus);

        void finishErrorTaskSuccess(String finishErrorTask);

        void resetOutStorageListScanStatusSuccess(String finishErrorTask);

        void searchNoData();
    }

    //Model层定义接口,外部只需关心Model返回的数据,无需关心内部细节,即是否使用缓存
    interface Model extends IModel {
        Observable<String> searchOutStorageListAutoStore(String userPhone, String uid);

        Observable<String> returnMaterialAutoStore(String out_storageList_id, String mid, String uid);

        Observable<String> callAutoMachineGetMaterial(String out_storagelist_batchid, String uid);

        Observable<String> outStoreForAndroidAuto(String uid, String mid, String out_storageList_id, String bufferId, String taskId);

        Observable<String> returnMaterialAllAutoStore(String uid, String mid, String out_storageList_id, String bufferId, String taskId);

        Observable<String> UpdateOutStorageListBackStatus(String out_storageList_id, String backStatus);

        Observable<String> UpdateOutStorageListScanBufferStatus(String out_storageList_id, String bufferStatus, String bufferId);

        Observable<String> UpdateOutStorageListScanMaterialStatus(String out_storageList_id, String mStatus, String mid);

        Observable<String> UpdateOutStorageListOutStatus(String out_storageList_id, String outStatus);

        Observable<String> resetOutStorageListScanStatus(Map<String, String> params);

        Observable<String> finishErrorTask(String out_storageList_id);
    }
}
